UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bVJytgbY1e8LG/T0fU+AOXohysfeD9bquiTEPOG+SJo='
WHERE
key_id = 'fb2a672cbd6531e0d600f82eac5e720364726bb88629e0700201439f2e8f70dd'
AND (
token = 'bVJytgbY1e8LG/T0fU+AOXohysfeD9bquiTEPOG+SJo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)