UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's/BEXKsAMyGH9lM98qd0jnh7ORVi90imlnZuCwUntGM='
WHERE
key_id = 'e53a26ff5ee84114c83d591404133d170be70d9fca777665b8fb229267622edc'
AND (
token = 's/BEXKsAMyGH9lM98qd0jnh7ORVi90imlnZuCwUntGM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)