UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qpggHvHAOHBeDVMKSbXfAJ2bmCEP17dtG7WNQzG5P70='
WHERE
key_id = '06d93f8af8e38deedffacdf399c12a5f9c5007e567c281d84590ae02898ff299'
AND (
token = 'qpggHvHAOHBeDVMKSbXfAJ2bmCEP17dtG7WNQzG5P70='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)