UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'k/gR//SuBsxPdmA/riNaMysKKhijpw5SKTazU2Cmv8I='
WHERE
key_id = 'b280ae7355e826b7ec3108b35d4d75c62528a3e5596dfc3ac56022e25def507e'
AND (
token = 'k/gR//SuBsxPdmA/riNaMysKKhijpw5SKTazU2Cmv8I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)