UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'R5LpIEwNCjRohYsoghmkjIkvKAO8XtI2sy8xBrs5WEY='
WHERE
key_id = '076f3e49561089e0182ac3ecf2bb612c8a8fdce71bebe0e0fda5aff5e6bc8853'
AND (
token = 'R5LpIEwNCjRohYsoghmkjIkvKAO8XtI2sy8xBrs5WEY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)