UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7pkCMM4V8BFbmCw/YO0e8x87FflqOG12APT090PuGnE='
WHERE
key_id = '760c862961fe986294d9c791cc8131e90632342afc1bfa06648a439b23b267b1'
AND (
token = '7pkCMM4V8BFbmCw/YO0e8x87FflqOG12APT090PuGnE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)