UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DfmoGk69NYhTYaRp8cY29JDxNr0Pvs18tedkhXsKjbE='
WHERE
key_id = '23e8ca111f91c9cded526e530e26f825db35306a34ac655e43be914204e75048'
AND (
token = 'DfmoGk69NYhTYaRp8cY29JDxNr0Pvs18tedkhXsKjbE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)