UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'buRb3v4UGh8uSjXO+7WUKSJ26CyAIJsn4VlafcJHhgs='
WHERE
key_id = '1cb06ce1f05a5d431e11544c665f3ab2a6519d5a7a9155cf378d2b2b061d33f7'
AND (
token = 'buRb3v4UGh8uSjXO+7WUKSJ26CyAIJsn4VlafcJHhgs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)