UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'T6Ft2cVJpT8Trcku2O34UCS/dd+4zYGb+LahAUlQntM='
WHERE
key_id = '7472da2da6abb29d1dfc62256ab6f6dbe5c5ede6c051ac7d68b47cfbba01f401'
AND (
token = 'T6Ft2cVJpT8Trcku2O34UCS/dd+4zYGb+LahAUlQntM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)