UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ko0t7woqItfexHYZkywPq2PI8ztgg4IXV2Y+OPzL2MY='
WHERE
key_id = '911fc56a769935c5a407cd4b0110cc552d5755db28b334692fcb18a41d02595c'
AND (
token = 'Ko0t7woqItfexHYZkywPq2PI8ztgg4IXV2Y+OPzL2MY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)