UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LzT5OIgsyxN/Q7zRExRWd1Gokzu3yNqs2b1HlBIixuw='
WHERE
key_id = '072c6d74feda234fafdadce9acccbdaeaea37a11c38d539c308a1603a47d9ac3'
AND (
token = 'LzT5OIgsyxN/Q7zRExRWd1Gokzu3yNqs2b1HlBIixuw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)