UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0e2Z6iXNf2rVxYspZRGpng14WLq0/OmrEFqHvYBAhPs='
WHERE
key_id = '403620f00208569622dec42ccf9b9ab9aabf7b29f092527a0c5cf0918e3306a0'
AND (
token = '0e2Z6iXNf2rVxYspZRGpng14WLq0/OmrEFqHvYBAhPs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)