UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u/Ejz5M5uGtN2Nk8rAL/hgIE+Es1dHrsanEBPUuwI0Q='
WHERE
key_id = 'e6d07abda7cb20148c9893c615d5e2f8495a3b987b139fee2f1a5f1cf12c7adf'
AND (
token = 'u/Ejz5M5uGtN2Nk8rAL/hgIE+Es1dHrsanEBPUuwI0Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)