UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'StHCj/AFyi/6H01o/q9AktOdPCTe96/rdt9Lnv7hDWo='
WHERE
key_id = 'd548a38dc9ce5dac2a7ad01020c3ee705a1b70da6acf2be6b69764d69638d249'
AND (
token = 'StHCj/AFyi/6H01o/q9AktOdPCTe96/rdt9Lnv7hDWo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)