UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JEis0HxFa6BmOo6Gu3c1DWcUYe1EMP2auHcfouCyEZ0='
WHERE
key_id = '1c2062ff7f8a3bee34a281bb967ab30b8a4e5ccfc569ea39645496a15387d30d'
AND (
token = 'JEis0HxFa6BmOo6Gu3c1DWcUYe1EMP2auHcfouCyEZ0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)