UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eqhiM9GWbn+uPWbZH1ulc1n7tghaZM/YMsidSD5c3oU='
WHERE
key_id = '7573c8e402baa622cb503de90f0bc0936d1290e31de284700690090feca6c536'
AND (
token = 'eqhiM9GWbn+uPWbZH1ulc1n7tghaZM/YMsidSD5c3oU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)