UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JVr68AgqW6ELY1Q3H7/EEjeTBL3nLFYTnzUO6N7c+u8='
WHERE
key_id = '596482e2d02f5c81403d6c52dcc9aea6d48abfbc00050d4d5c3460b66a2439aa'
AND (
token = 'JVr68AgqW6ELY1Q3H7/EEjeTBL3nLFYTnzUO6N7c+u8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)