UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EkR+GzR10Xu7dZ8681NyLiaWGpn4JDbSeC77iz6i8SY='
WHERE
key_id = '1fbfa85567323134563c2e61bee8f05d5ad6faa9e9950fdd1d0ee6af80129d3b'
AND (
token = 'EkR+GzR10Xu7dZ8681NyLiaWGpn4JDbSeC77iz6i8SY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)