UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u0QTr7GI0k41T7uuibYOb0TK5Q9GpJ9/lMncuF1J8Ww='
WHERE
key_id = '1d9c3aaa3292a3eff9c566eeb6a3c02eed53469f5b4142fa7710d7b4ae1de461'
AND (
token = 'u0QTr7GI0k41T7uuibYOb0TK5Q9GpJ9/lMncuF1J8Ww='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)