UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cJ9VwaVYF92+cv7mjYPO8gIQMgNFl+zhedc6Kg4fY6c='
WHERE
key_id = 'c1e92f8072e4d67a521ef761fef83fea6c74f525afad5c7d7fc2dbe5f65e7112'
AND (
token = 'cJ9VwaVYF92+cv7mjYPO8gIQMgNFl+zhedc6Kg4fY6c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)