UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0k6GFaQ8MNNiWHyKdm0wdoFzblSs6DRgxef/ldcnHCI='
WHERE
key_id = '4286e66618009be67debc6f1fb0bdc6ab0d9e751153d319d8fbbe7bdb85fcc52'
AND (
token = '0k6GFaQ8MNNiWHyKdm0wdoFzblSs6DRgxef/ldcnHCI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)