UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '72s0HVkbepSV/xwnkJ0r5DpjjhrjnpnI3qv+lQwJ9YM='
WHERE
key_id = '4c432ed7b4449964b52482617568591479ce9b40219124a4760b0195d796dabf'
AND (
token = '72s0HVkbepSV/xwnkJ0r5DpjjhrjnpnI3qv+lQwJ9YM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)