UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fNoVZQYvkJuxtLrm15AQ7Ja/k99aQDBdQvIpB2N9v6w='
WHERE
key_id = 'cf2592bbfbd012b33c390e13b79ba1cc4df037ed4b132f2d274f86b1a21a2273'
AND (
token = 'fNoVZQYvkJuxtLrm15AQ7Ja/k99aQDBdQvIpB2N9v6w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)