UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ggH8Ac6pQ/EHrWwPrkpn/pIr2wpM2eYJYgo6196y8Io='
WHERE
key_id = '188b1711059e788ef5e4e52129920305ccfbc7afb6afbc3f0628817eeecae044'
AND (
token = 'ggH8Ac6pQ/EHrWwPrkpn/pIr2wpM2eYJYgo6196y8Io='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)