UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nPczl+luUBTElpRRzRubulvOSU0K0QF1Vop8pYd0FKE='
WHERE
key_id = '3b576a259b93161de2bd8b92c2813a00717f919560fccbaf9d6d46a5f860e66e'
AND (
token = 'nPczl+luUBTElpRRzRubulvOSU0K0QF1Vop8pYd0FKE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)