UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jVlzzyvxO2iuEjlbsR6WIHyJ1GyY7XylIpHbTc/ycO4='
WHERE
key_id = '418593f7dd36028cc884749ae7b741468b924f7cc49d7ee54fc81d69251b5069'
AND (
token = 'jVlzzyvxO2iuEjlbsR6WIHyJ1GyY7XylIpHbTc/ycO4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)