UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YxLWdraEdReXil4efiAwyRMQRaPR2uI6UY5JSRzlWaA='
WHERE
key_id = '929ef9afe9625638bf4d34a430412efce27a61d362834c094583cc2ff9c681fa'
AND (
token = 'YxLWdraEdReXil4efiAwyRMQRaPR2uI6UY5JSRzlWaA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)