UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TiA7qpcULNYmPbFd17flD9d8jxMEuLA9Tehl/qK6G8s='
WHERE
key_id = '2b70290a704634b1be77d44fc7b8233038ae0d369169886168f1935fdc1e3791'
AND (
token = 'TiA7qpcULNYmPbFd17flD9d8jxMEuLA9Tehl/qK6G8s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)